package org.bai.meetingfilm.backend.user.controller.vo;

import org.apache.commons.lang3.StringUtils;
import org.bai.meetingfilm.common.vo.BaseRequestVO;
import org.bai.meetingfilm.exception.CommonServiceException;

public class LoginReqVO extends BaseRequestVO {

    private String userName;

    private String password;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public void checkParam() throws CommonServiceException {
        // 验证数据

        if (StringUtils.isEmpty(userName) || StringUtils.isEmpty(password)) {
            throw new CommonServiceException(404, "userName 或 password 不能为空");
        }

    }
}
